local tongwan = fk.CreateSkill{
  name = "qsjx__tongwan",
  tags = { Skill.Lord }
}

Fk:loadTranslationTable{
  ["qsjx__tongwan"] = "统万",
  [":qsjx__tongwan"] = "主公技，回合技，十六国角色进入濒死状态时，你可摸X张牌（X为“髅台”发动次数）。",
  ["$qsjx__tongwan1"] = "锥入城墙杀工匠，统万坚城永无破！",
  ["$qsjx__tongwan2"] = "朔方风雪炼钢刀，大夏龙兴自狼居！",
}

tongwan:addEffect(fk.EnterDying, {
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(tongwan.name) and Fk.generals[target.general].guo16 and player:usedSkillTimes(tongwan.name) == 0
  end,
  on_use = function(self, event, target, player, data)
    local n = player:usedSkillTimes("qsjx__loutai", Player.HistoryGame)
    player:drawCards(n, tongwan.name)
  end,
})

return tongwan
